home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Files / FilePermission.h < prev    next >
Text File  |  1997-06-28  |  725b  |  32 lines

  1. // FilePermission.h
  2.  
  3. #ifndef FilePermission_h
  4. #define FilePermission_h
  5.  
  6. #ifndef Integers_h
  7. #include "Integers.h"
  8. #endif
  9.  
  10. class FilePermission
  11.   {
  12.     private:
  13.         int8 permission;
  14.     
  15.         FilePermission( int16 value )
  16.           : permission( value )
  17.           {}
  18.         
  19.     public:
  20.         static FilePermission ReadOnly()            { return fsRdPerm; }
  21.         static FilePermission ReadWrite()        { return fsWrPerm; }
  22.         static FilePermission Available()        { return fsCurPerm; }
  23.         static FilePermission Shared()            { return fsRdWrShPerm; }
  24.     
  25.         int8 Value() const                            { return permission; }
  26.         
  27.         bool operator==( FilePermission f ) const        { return permission == f.permission; }
  28.         bool operator!=( FilePermission f ) const        { return permission != f.permission; }
  29.   };
  30.  
  31. #endif
  32.